﻿using System;
using System.Collections.Generic;
using Informant.Contacts;

namespace Informant.Clients.DataProviders
{
	public class SendSmsCompletedEventArgs : EventArgs
	{
		private static SendSmsCompletedEventArgs _empty;

		/// <summary>
		/// Initializes a new instance of the <see cref="SendSmsCompletedEventArgs"/> class.
		/// </summary>
		/// <param name="succeeded">if set to <c>true</c> [succeeded].</param>
		public SendSmsCompletedEventArgs(Boolean succeeded) : this(succeeded, null) { }
		/// <summary>
		/// Initializes a new instance of the <see cref="SendSmsCompletedEventArgs"/> class.
		/// </summary>
		/// <param name="succeeded">if set to <c>true</c> [succeeded].</param>
		/// <param name="failedRecipients">The failed recipients.</param>
		public SendSmsCompletedEventArgs(Boolean succeeded, IEnumerable<IPhone> failedRecipients)
		{
			Succeeded = succeeded;
			FailedRecipients = failedRecipients;
		}

		/// <summary>
		/// Gets the empty.
		/// </summary>
		/// <value>The empty.</value>
		public new SendSmsCompletedEventArgs Empty
		{
			get
			{
				if (_empty == null)
				{
					_empty = new SendSmsCompletedEventArgs(false);
				}
				return _empty;
			}
		}
		/// <summary>
		/// Gets or sets a value indicating whether this <see cref="SendSmsCompletedEventArgs"/> is succeeded.
		/// </summary>
		/// <value><c>true</c> if succeeded; otherwise, <c>false</c>.</value>
		public Boolean Succeeded { get; private set; }
		/// <summary>
		/// Gets or sets the failed recipients.
		/// </summary>
		/// <value>The failed recipients.</value>
		public IEnumerable<IPhone> FailedRecipients { get; private set; }
	}
}
